{template header}
<h4 style="padding-left:10px;;">
    <span>搜索</span>
    <i class="icon-search"></i>
</h4>
<form class="form-horizontal" method="get" action="/index.php">
    <div class="control-group search-group">
        <label class="control-label" >输入货号：</label>
        <div class="controls">
          <input type="text" placeholder="" name="product_code" value="">
        </div>
    </div>
    <div class="control-group search-group">
        <div class="controls">
            <input type="hidden" name="c" value='admin'>
            <input type="hidden" name="a" value="goodsInfo"/>
            <input type="hidden" name="match_id" value="{$match_id}"/>
            <button class="btn" type="submit">添加</button>
        </div>
    </div>
</form>
<style type="text/css">
     td, th {
        min-width: 100px; max-width: 300px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis ;
         overflow: hidden; text-align: center;
}
   td:nth-child(1),
     th:nth-child(1) { max-width: 100px;  text-align: left;}
     td:nth-child(3),
     th:nth-child(3) { max-width: 80px; text-align: center; }
     td:nth-child(4),
     th:nth-child(4) { max-width: 30px; text-align: center; }
     td:nth-child(14),
     th:nth-child(14) { max-width: 20px; text-align: center; }
     td:nth-child(6),
     th:nth-child(6) { max-width: 60px; text-align: center; }
     td:nth-child(7),
     th:nth-child(7) { max-width: 60px; text-align: center; }
     


     .table-striped th,
     .table-striped td  { text-align: center;}
    
</style>
<div class="bs-docs-example" style="clear:both; padding-top: 30px;">
    <table class="table table-striped">
        <thead>
            <tr >
                <th>顺序</th>
                <th>名称</th>
                <th>规格与数量</th>
                <th>价格</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {loop $goodsList $k $v}
            <tr id="{$v['id']}">
                <td>{$v['sort']}</td>
                <td>{$v['product']['title']}</td>
                <td>
                    {loop $v['childGoods'] $k $childGoods}
                      {$childGoods['attrPathName']}: {$childGoods['stockNum']}<br/>
                    {/loop}
                </td>
                <td>
                    {loop $v['childGoods'] $k $childGoods}
                      {$childGoods['saleprice']}<br/>
                    {/loop}
                </td>
                <td><a href="?c=admin&a=goodsList&match_id={$match_id}&action=del&product_id={$v['product']['id']}">删除</a></td>
            </tr>
            {/loop}
        </tbody>
    </table>
</div>
{template footer}
